{% extends "Skins/default/basepage.html" %}

{% block title %}{{ articleInfo.title }}{% endblock %}

{% block content %}

<div class="article">
            
    {% if message%}
    <b>{{message}}</b>
    {% endif %}


    <div class="artTitle"><h1>{{title}}</h1></div>

    <div class="artCon">{{articleInfo.content|safe}}
        <div>支持({{articleInfo.goods}})&nbsp;&nbsp;┆&nbsp;&nbsp;反对({{articleInfo.bads}})</div>
    </div>

    <div class="artMeta">
        <span><a href="{% url 'userhome' uid=articleInfo.user_id%}">{{articleInfo.username}}</a>&nbsp;&nbsp;┆&nbsp;&nbsp;{{articleInfo.createtime}}&nbsp;&nbsp;┆&nbsp;&nbsp;阅读({{articleInfo.views}})&nbsp;&nbsp;┆&nbsp;&nbsp;评论({{articleInfo.comments}})
            {% if userInfos.isme%}
            &nbsp;&nbsp;┆&nbsp;&nbsp;<a href="{% url 'articleedit' uid=articleInfo.user_id aid=articleInfo.id%}">编辑</a>
            {% endif %}
        </span>
    </div>
</div>
<div id="commentList" class="commentList">
    <form name="form1" method="POST" action="" >
        {% csrf_token %}
        <table>
            <tr>
                <td>用户名</td>
                <td><input name="user_name" type="text" size="60" value="{{userInfos.currentuser.username}}"/></td>
            </tr>
            <tr>
                <td>内容</td>
            <td><textarea name="content" type="text" rows="5" cols="50" ></textarea></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" name="ok" value="--修改--"/></td>
            </tr>

        </table>
    </form>

    {% if commentList %}
    {% for commentInfo in commentList %}
    <div class="comment">
        
        <span class="username">{{commentInfo.username}}</span>
        <span class="createtime">{{commentInfo.createtime}} 发表</span>
        <div class="clear"></div>
        <div class="content">{{commentInfo.content}}</div>
        <div class="clear"></div>
        <div class="meta">
            <span>支持</span>
            <span>支持</span>
            <span>支持</span>

        </div>
        
    </div>
<div class="clear"></div>
    {% endfor %}
    {% endif %}
</div>
{% endblock%}